package com.szcinda.fitness;

import com.szcinda.fitness.persistence.Relationship;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface RelationshipRepository extends JpaRepository<Relationship,String> {

    int countByCoachOpenId(String coachOpenId);

    List<Relationship> findByCoachOpenId(String openId);

    Relationship findByCoachOpenIdAndTraineeOpenId(String coachOpenId,String traineeOpenId);
}
